package com.central.apps.handler.timeTask;

import com.central.app.handler.factory.HandlerFactory;
import com.central.apps.handler.PmlistHandler;
import lombok.extern.apachecommons.CommonsLog;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Configuration
@EnableScheduling
@CommonsLog
public class PmlistTask {

    //格式: 秒 分 时 日 月 星期 年 每天1点查询一次
    //@Scheduled(cron="0 00 01 * * ?")
    @Scheduled(cron="0 15 16 * * ?")
    public void djTimeTask() throws Exception {
        PmlistHandler handler = (PmlistHandler) HandlerFactory.getBeanHandler("com.central.apps.handler.PmlistHandler");
        handler.pmToWorkorder();
    }
}
